<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	template="adminTemplate.xhtml">
	<ui:define name="pageIntro">
		<h2>Create an User</h2>
		<p class="lftText">Use this form to create an <span>user</span>.<br />
		You can not create two users with same e-mail.<br />
		You can also imports users from a ldap directory, database or excel
		from <span>Import Users</span> menu at right side.</p>


	</ui:define>
	<ui:define name="mainForm">
		<h:form id="crtUsrForm">
			<h:panelGrid columns="3">

				<h:outputLabel for="crtUsrName" value="Name"></h:outputLabel>
				<h:inputText id="crtUsrName" value="#{createUser.user.name}"
					required="true">
					<f:validateLength minimum="3" maximum="20" />
				</h:inputText>
				<h:message for="crtUsrName" />

				<h:outputLabel for="crtUsrLastName" value="Lastname"></h:outputLabel>
				<h:inputText id="crtUsrLastName" value="#{createUser.user.lastName}"
					required="true">
					<f:validateLength minimum="3" maximum="20" />
				</h:inputText>
				<h:message for="crtUsrLastName" />

				<h:outputLabel for="crtUsrMail" value="E-Mail"></h:outputLabel>
				<h:inputText id="crtUsrMail" value="#{createUser.user.email}"
					required="true">
					<f:validateLength maximum="60" />
					<t:validateEmail />
				</h:inputText>
				<h:message for="crtUsrMail" />

			</h:panelGrid>
			<h:commandButton id="crtUsrSbmt" value="Save"
				action="#{createUser.save}"></h:commandButton>
		</h:form>
	</ui:define>
</ui:composition>
